/*
** ############################################################################
**     Project   : osdee - Operative Systems Design for Embedded Envrionments
**     File      : MCU_CFG.h
**     Revision  ; 1.0
**     Abstract  :
**         Configuration file for MCU components.
**     Processor : MC9S12XEP100CVL
**     Version   : Component 01.042, Driver 01.05, CPU db: 3.00.036
**     Datasheet : MC9S12XEP100 Rev. 1.19 12/2008
**
**     Copyright : 2014 Fernando Rodriguez, Open source with out any responsability.
**     
**     mail      : frr@gmail.com
** ############################################################################
*/

#ifndef _MCU_CFG_H_
#define _MCU_CFG_H_

/** Variable types and common definitions */
#include    "cdef.h"

/*
** ===================================================================
**     Clock Resources
** ===================================================================
*/

/*Select XTAL Frecuency or BusClock Frecuency using PLL - Select ONLY one*/
/*#define CFG_XTAL_FRECUENCY*/     /* For XTAL Frecuency usage */
#define CFG_BUS_CLOCK_FRECUENCY    /* For PLL usage */


/** Select XTAL and BUS Clock frequency in KHz */
#define CNF_BUS_FREQ_KHZ        48000u  /* BUS clock frequency */     
#define CNF_XTAL_FREQ_KHZ       4000u   /* Xtal frequency */

/** Select Oscillator configuration based on external hardware - Select ONLY one */
#define CFG_OSC_LOOP_CTRLD_PIERCE 
/* #define  OSC_FULL_SWING_PIERCE   */

/*
** ===================================================================
**     Microcontroller Derivative
** ===================================================================
*/

/** Microcontroller Derivative Selection - Select ONLY one */
#define     CFG_S12XEP100
/* #define      CFG_S12XS256      */
/* #define      CFG_S08DZ60       */
	
	
/** Microcontroller derivative information */
 
#ifdef CFG_S12XEP100  
    /* Type of core */
    #define __S12_CORE			0u
    #define __XGATE_CORE		1u
    #define __MCU_LINK_DERIVATIVE  "mc9s12xep100"  /* MCU linker directive file */
#else
    #error "Invalid MCU derivative"   
#endif

/** Define static checking compliance */
#define __MISRA__

#endif /*_MCU_CFG_H_*/